    package hibernate_advanced_apply.object_inherit_mapping.subtabel.annotation.source;

    import javax.persistence.*;

    /**
     * @author Administrator
     * @create 2019-01-11 13:51
     * @desc 员工持久类
     **/
    @Entity//子类
    @Table(name="staff")
    //使用属性重写组重写父类中的属性,让每次使用的都是重写后的属性
    @AttributeOverrides({//可以不写
            @AttributeOverride(name="id",column = @Column(name = "id")),
            @AttributeOverride(name="name",column=@Column(name="name"))}
    )
    public class Staff extends Company {

        private String work;

        public String getWork() {
            return work;
        }

        public void setWork(String work) {
            this.work = work;
        }
    }
